import java.io.IOException;
import java.util.Arrays;
import java.util.Set;
import java.util.TreeSet;


public class Fast {

	public static void main(String[] args) throws IOException {
//		Stopwatch timer = new Stopwatch();
//	    StdDraw.setXscale(0, 32768);
//        StdDraw.setYscale(0, 32768);
        
		String fileName = args[0];
		In in = new In(fileName);
		int N = in.readInt();
		
		Point[] points = new Point[N];
		
		for (int i = 0; i < N; i++) {
			int x = in.readInt();
			int y = in.readInt();
			Point p = new Point(x, y);
			points[i] = p;
		}
		
		Set<String> results = new TreeSet<String>();
		Point p = null;
		for (Point point : points) {
			p = point;
			Arrays.sort(points, p.SLOPE_ORDER);
			for (int i = 0; i < points.length-2; i++) {
				Point a = points[i];
				Point b = points[i+1];
				Point c = points[i+2];
				if (p.SLOPE_ORDER.compare(a, b) == 0) {
					if (p.SLOPE_ORDER.compare(b, c) == 0) {
						Point[] arr = new Point[]{p,a,b,c};
						Arrays.sort(arr);
						results.add(arr[0] + " -> " + arr[1] + " -> " + arr[2] + " -> " + arr[3]);
//						p.drawTo(c);
					}
				}
			}
		}
		
		for (String string : results) {
			System.out.println(string);
		}
//		System.out.println(timer.elapsedTime());
//		StdDraw.show(0);
	}

}
